package com.arsl.client.event;

import java.util.HashMap;

import com.google.gwt.event.shared.GwtEvent;

public class ShowViewEvent extends GwtEvent<ShowViewEventHandler> {

	public static Type<ShowViewEventHandler> TYPE = new Type<ShowViewEventHandler>();

	public HashMap<String, String> args = new HashMap<String, String>();

	public static final String VIEW_ARG = "VIEW";

	public static final String VIEW_PAGE_TAGGER = "PageTagger";
	public static final String VIEW_CREATE_AR_PAGE = "CreateARPage";
	public static final String VIEW_ADD_CONTENT = "AddContent";

	public static final String CONTAINER = "Container";
	public static final String ARG_ARPAGEID = "arPageId"; // used when viewing
															// page tagger.

	public static final String POPUP_PANEL = "Popup";

	public static final String ARG_PAPERID = "paperId";

	public static final String VIEW_PAGESELECTOR_PANEL = "page_selector_panel";

	public static final String VIEW_MANAGE_PAPER = "manage_paper";

	public static final String VIEW_ANALYTICS = "view_analytics";

	public String getArg(String arg) {
		return args.get(arg);
	}

	public void setArg(String arg, String val) {
		args.put(arg, val);
	}

	@Override
	public Type<ShowViewEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(ShowViewEventHandler handler) {
		handler.onShowViewEvent(this);
	}
}
